<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head th:replace="/common/head::baseHead('用户中心')"></head>
<style type="text/css">
    ._avatar {
        width: 100%;
    }
</style>

<body>
    <div th:replace="/common/navbar::navbar(userCenter)"></div>
    <br>
    <div class="container">
        <div class="row">
            <div class="col-md-10">
                <table class="table table-striped table-bordered">
                    <thead>
                        <tr>
                            <th scope="col">项目编号</th>
                            <th scope="col">项目名</th>
                            <th scope="col">项目组长</th>
                            <th scope="col">项目指导老师</th>
                            <th scope="col">项目状态</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr th:each="project,iterStat : ${projectPage.content}">
                            <th scope="row" th:text="${project.id}"></th>
                            <td th:text="${project.title}">-</td>
                            <td th:text="${project.leader != null}?${project.leader.user.name}:'-'">-</td>
                            <td th:text="${project.teacher != null}?${project.teacher.user.name}:'-'">-</td>
                            <td th:text="${project.state}">-</td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="col-md-2">
                <ul class="list-group">
                    <li class="list-group-item d-flex justify-content-center align-items-center">
                        <img th:src="@{${user.avatarUrl}}" class="rounded _avatar">
                    </li>
                    <li class="list-group-item d-flex justify-content-center align-items-center" th:text="${user.username}">username</li>
                    <li class="list-group-item d-flex justify-content-between align-items-center">我的未读消息
                        <span class="badge badge-primary badge-pill">14</span>
                    </li>
                    <li class="list-group-item d-flex justify-content-between align-items-center">我的项目总数
                        <span class="badge badge-primary badge-pill">14</span>
                    </li>
                </ul>
                <br>
                <ul class="list-group">
                    <li class="list-group-item d-flex justify-content-center align-items-center">
                        <button type="button" class="btn btn-success col-md-12">创建新项目</button>
                    </li>
                </ul>

            </div>
        </div>
    </div>
    <!--script-->
    <div th:replace="/common/js::baseJs"></div>
    <script>

    </script>
</body>

</html>